function [mix vars] = killComponentsSmall(mix, vars, options)


kill_tol = 0;
comps_to_kill = zeros(1, mix.ncentres);
while true
    [min_prior min_ind] = min(mix.priors);
    if min_prior <= kill_tol
        comps_to_kill(min_ind) = 1;
            mix.priors(min_ind) = realmax;
    else
        break;
    end

    kept_comps = (comps_to_kill == 0);
    mix.priors(kept_comps) = mix.priors(kept_comps)/sum(mix.priors(kept_comps));
end

kill_string = repmat('*', 1, mix.ncentres);
kill_string(comps_to_kill==1) = 'X';
if options.verbose
    fprintf(kill_string);
end

[mix vars] = killComponents(mix, vars, find(comps_to_kill == 1));
